﻿using System;
using System.Collections;
using System.Collections.Generic;

namespace Poly2Tri
{
	// Token: 0x0200040E RID: 1038
	public struct FixedBitArray3 : IEnumerable<bool>, IEnumerable
	{
		// Token: 0x17000428 RID: 1064
		public bool this[int index]
		{
			get
			{
				switch (index)
				{
				case 0:
					return this._0;
				case 1:
					return this._1;
				case 2:
					return this._2;
				default:
					throw new IndexOutOfRangeException();
				}
			}
			set
			{
				switch (index)
				{
				case 0:
					this._0 = value;
					break;
				case 1:
					this._1 = value;
					break;
				case 2:
					this._2 = value;
					break;
				default:
					throw new IndexOutOfRangeException();
				}
			}
		}

		// Token: 0x06001CFA RID: 7418 RVA: 0x000B42D0 File Offset: 0x000B24D0
		public bool Contains(bool value)
		{
			for (int i = 0; i < 3; i++)
			{
				if (this[i] == value)
				{
					return true;
				}
			}
			return false;
		}

		// Token: 0x06001CFB RID: 7419 RVA: 0x000B4300 File Offset: 0x000B2500
		public int IndexOf(bool value)
		{
			for (int i = 0; i < 3; i++)
			{
				if (this[i] == value)
				{
					return i;
				}
			}
			return -1;
		}

		// Token: 0x06001CFC RID: 7420 RVA: 0x000B4330 File Offset: 0x000B2530
		public void Clear()
		{
			this._0 = (this._1 = (this._2 = false));
		}

		// Token: 0x06001CFD RID: 7421 RVA: 0x000B4358 File Offset: 0x000B2558
		public void Clear(bool value)
		{
			for (int i = 0; i < 3; i++)
			{
				if (this[i] == value)
				{
					this[i] = false;
				}
			}
		}

		// Token: 0x06001CFE RID: 7422 RVA: 0x000B438C File Offset: 0x000B258C
		private IEnumerable<bool> Enumerate()
		{
			for (int i = 0; i < 3; i++)
			{
				yield return this[i];
			}
			yield break;
		}

		// Token: 0x06001CFF RID: 7423 RVA: 0x000B43B4 File Offset: 0x000B25B4
		public IEnumerator<bool> GetEnumerator()
		{
			return this.Enumerate().GetEnumerator();
		}

		// Token: 0x06001D00 RID: 7424 RVA: 0x000B43C1 File Offset: 0x000B25C1
		IEnumerator IEnumerable.GetEnumerator()
		{
			return this.GetEnumerator();
		}

		// Token: 0x04001DB8 RID: 7608
		public bool _0;

		// Token: 0x04001DB9 RID: 7609
		public bool _1;

		// Token: 0x04001DBA RID: 7610
		public bool _2;
	}
}
